<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head th:replace="layouts::header"></head>
<body>
<nav th:replace="layouts::navbar"></nav>
<div class="container1">
    <form th:action="@{/association/save}" th:object="${association}" method="POST">
        <div class="box">
        <div class="form-group">
            <div>
                <label class="a1">社团名称:</label>
                <input type="text" placeholder="请输入社团名称" th:field="${association.associationName}"><br>
                <span th:if="${#fields.hasErrors('associationName')}" th:errors="${association.associationName}"></span>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div>
                <label class="a1">指导老师:</label>
                <select class="form-control" style="width: 290px" th:field="*{teacher}">
                    <option th:each="teacher : ${teacher}" th:value="${teacher.teacherId}" th:text="${teacher.name1}">
                    </option>
                </select>
            </div>
        </div>
        <br>
        <div class="form-group">
            <div class="a4">
                <label class="a1">社团活动:</label>
                <textarea type="text" placeholder="请输入社团活动" th:field="${association.activity}"></textarea><br>
                <span th:if="${#fields.hasErrors('activity')}" th:errors="${association.activity}"></span>
            </div>
        </div>
        <br>
        </div>
        <div class="a2">
        <button class="btn btn-info" type="submit" >新建社团</button>
        </div>
    </form>
</div>
</body>
</html>